package com.lm.fastjson.example;

import com.alibaba.fastjson.JSON;
import com.lm.fastjson.entry.Person;

public class FastjsonDeserializationExample {
    public static void main(String[] args) {
        // JSON 字符串
        String jsonString = "{\"address\":{\"city\":\"Shanghai\",\"zip\":\"200000\"},\"age\":28,\"name\":\"Alice\"}";

        // 使用 Fastjson 进行反序列化
        Person person = JSON.parseObject(jsonString, Person.class);
        System.out.println("Deserialized Person: " + person.getName() + ", " + person.getAge() + ", " + person.getAddress().getCity());
    }
}
